using UnityEngine;
using UnityEngine.Rendering;
    
// The CreateAssetMenu attribute lets you create instances of this class in the Unity Editor.
[CreateAssetMenu(menuName = "Rendering/ExampleRenderPipelineAsset")]
public class HRenderPipelineAsset : RenderPipelineAsset
{
    [SerializeField]
    public bool SRPBatcher = true;
    public bool VisibilityBufferDebug = false;
    public ComputeShader unpackCompute;
    public ComputeShader rasterCompute;
    // Unity calls this method before rendering the first frame.
    // If a setting on the Render Pipeline Asset changes, Unity destroys the current Render Pipeline Instance and calls this method again before rendering the next frame.
    protected override RenderPipeline CreatePipeline() {
        // Instantiate the Render Pipeline that this custom SRP uses for rendering.
        return new HRenderPipelineInstance(unpackCompute, rasterCompute);
    }

    protected override void OnValidate() {
        GraphicsSettings.useScriptableRenderPipelineBatching = SRPBatcher;
    }
}
